package com.wee.aircoach_user;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.ListView;


import com.wee.adapter.MessageAdapter;

import java.util.Arrays;

/**
 * 我的消息
 */
public class MyMessageActivity extends Activity implements View.OnClickListener {
    private ListView listView;
    MessageAdapter adapter;
    private String[] test = {
      "a","b","c"
    };

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_my_message);
        initView();
    }

    private void initView() {
        findViewById(R.id.back).setOnClickListener(this);
        listView = (ListView)findViewById(R.id.list);

        adapter = new MessageAdapter(this, Arrays.asList(test));
        listView.setAdapter(adapter);
    }

    @Override
    public void onClick(View v) {
        if(v.getId() == R.id.back){
            finish();
        }
    }

}